* Preparing data for using PanelMatch *
 cd "/Users/mariadelmarcanizaresespadafor/Dropbox/Side projects/BET HOUSES PROJECT/data/Gambling_Replication_Materials/Data"

use "gambling_data.dta", clear
drop if school_id==.
keep school_id treat2 year
gen time = 0 
replace time=1 if year==2015
replace time =2 if year==2016
replace time = 3 if year==2017

gen time4= "a"
replace time4= "b" if year == 2015
replace time4= "c" if year == 2016
replace time4= "d" if year == 2017

rename treat2 treat
save "panelmatch.dta", replace
